package com.kevin.himly.account.from.service;

import com.kevin.himly.account.from.entity.Account;
import com.kevin.himly.account.from.mapper.AccountMapper;
import org.dromara.hmily.annotation.Hmily;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl {

    @Autowired
    AccountMapper accountMapper;

    @Hmily(confirmMethod = "confirmUpdate", cancelMethod = "cancelUpdate")
    public void update(Account account) {
        System.out.println("入账   开始==>");
    }

    public void confirmUpdate(Account account) {
        System.out.println("入账   确认==>");
        accountMapper.update(account);
    }

    public void cancelUpdate(Account account) {
        System.out.println("入账   取消  空操作==>");
    }
}
